<template>
  <div class="book" :style="background">
    <a href="" class="inner">
      <h3>{{title}}</h3>
      <span>{{text}}</span>

      <div class="wrapper">
            <span>
                <img
                :src="urlimg"
                alt=""/>
            </span>
            <div class="content">
            <div class="name">{{name}}</div>
            <div class="desc">{{desc}}</div>
            </div>
      </div>
    </a>
  </div>
</template>

<script>
export default {
  props:["title","text","urlimg","name","desc","background"]
};
</script>

<style>
.book {
  width: 1.32rem;
  height: 1.78rem;
  margin-right: 0.105rem;
  font-size: 0.13rem;
  border: 1px solid transparent;
  display: inline-block;
  border-radius: 5px;
  /* 页面背景 */
  /* background: linear-gradient(
        to top,
        rgba(109, 156, 147, 0.8) 0%,
        rgba(109, 156, 147, 0.3) 35%,
        rgb(109, 156, 147) 59%
      )
      center top / auto no-repeat,
    url(/HomePageImg/1.png)
      center center / cover no-repeat; */
  color: rgb(238, 238, 238);
}
.book:nth-child(1) {
  margin-left: 0.105rem;
}
.inner {
  display: block;
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  padding: 0.12rem;
  position: relative;
}
.inner > h3 {
  margin-bottom: 0.015rem;
  line-height: 1.44;
  font-size: 0.18rem;
  font-weight: 500;
  overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 3;
-webkit-box-orient: vertical;
}
.inner > span {
  vertical-align: middle;
  font-size: 0.12rem;
}

.wrapper {
  width: 1.18rem;
  height: 0.365rem;
  display: flex;
  overflow: hidden;
  position: absolute;
  -webkit-box-align: center;
  align-items: center;
  max-width: 100%;
  bottom: 0.16rem;
}
.wrapper > span {
  display: inline-block;
  flex-shrink: 0;
  vertical-align: top;
  box-sizing: border-box;
  width: 30px;
  height: 30px;
  background: rgb(242, 242, 242);
  border: 1px solid rgb(242, 242, 242);
  border-radius: 99px;
  overflow: hidden;
}
.wrapper > span > img {
  display: block;
  width: 100%;
  border-style: none;
}

.wrapper > .content {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  margin-left: 6px;
  padding-right: 16px;
  max-width: 100%;
}
.wrapper > .content > .name {
  overflow: hidden;
  max-width: 100%;
  font-size: 14px;
  font-weight: 400;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.wrapper > .content > .desc {
  max-width: 100%;
  font-size: 10px;
}
</style>